<?php
//if(empty($username) or empty($password) or empty($email)) 
//{$msg="Ada data yang belum diisi..."; $alamat="signup.html"; header("location:$alamat?msg=$msg"); exit();}

// define connection
include "p_koneksi.php";

// Define POST fetch
$myusername=$_POST['username']; 
$myemail=$_POST['email']; 
$mypassword=$_POST['password']; 
$mygolongan=$_POST['golongan']; 
$mynama=$_POST['nama']; 
$myalamat=$_POST['alamat']; 
$mygender=$_POST['gender']; 
$myttl=$_POST['ttl']; 
$mytelepon=$_POST['telepon']; 
$myrekening=$_POST['rekening']; 


//enkripsi password
$keyword=md5($mypassword);

//memasukkan data ke dalam table_member 
$query="INSERT INTO aktor (id_aktor, username, email, password, golongan, nama, alamat, gender, ttl, telepon, rekening) 
		VALUES (null, '$myusername', '$myemail', '$keyword', '$mygolongan', '$mynama', '$myalamat', '$mygender', '$myttl', '$mytelepon', '$myrekening')";
		
if (!mysql_query($query,$connect))
  {
  die('Error: ' . mysql_error());
  }
header("location:dashboard/login.php");
echo "1 record added";

mysql_close($connect);

?>